#!/bin/sh
#
# asudserver	Start the asudserver daemon
#
# chkconfig: 345 98 05
# description: asudserver
# processname: asudserver
# pidfile: /var/run/asudserver.pid


# Source function library
[ -f /etc/rc.d/init.d/functions ] && . /etc/rc.d/init.d/functions

# pull in sysconfig settings
[ -f /etc/sysconfig/asudserver ] && . /etc/sysconfig/asudserver

ulimit -s 512
ulimit -n 10240
ulimit -c unlimited

RETVAL=0
DAEMON_COREFILE_LIMIT=unlimited

PATH=/sbin:/bin:/usr/bin:/usr/sbin
prog="/usr/sbin/asudserver"

start()
{
	echo -n $"Starting asudserver daemon: "
	if [ "$(pidofproc $prog)" = "" ]; then
		daemon $prog $OPTIONS
		echo
	else
		failure
		echo
	fi
}

stop()
{
	echo -n $"Stopping asudserver daemon: "
	killproc $prog
	echo
}

case "$1" in
  start)
	start
        ;;

  stop)
	stop
        ;;
  status)
        status $prog
        ;;
  restart|reload)
        $0 stop
        $0 start
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|reload}"
        exit 1
esac

exit 0

